public class demo9 {
    public static void main(String[] args) throws InterruptedException {
        Object object = new Object();
        Thread t = new Thread(()->{
            synchronized (object){
                System.out.println("等待之前");
                try {
                    object.wait();
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                System.out.println("等待之后");
            }
        });
        System.out.println("唤醒之前");
        object.notify();
        System.out.println("唤醒之后");

    }
}
